#include<stdio.h>
#include<string.h>
char a[100];
int cnt1=0, cnt2=0;
int main()
{
	while(scanf("%s", a) != EOF)
	{
		int n = strlen(a);
		for(int i=0; i<n; i++)
		{
			if(a[i]=='0')
			{
				cnt1++;
				if(a[i+1] != '0')
				{
					printf("%d ", cnt1);
					cnt1 = 0;
				}
			}
			if(a[i]=='1')
			{
				cnt2++;
				if(a[i+1] != '1')
				{
					printf("%d ", cnt2);
					cnt2 = 0;
				}
			}
		}
		printf("\n");
	}

	//printf("%d", n-m1-m2);
	return 0;
}

//000000111100011110000011
//6 4 3 4 5
